package my.soft.aiteacher.student.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 基础五星评分表
 * </p>
 *
 * @author GMCX
 * @since 2025-06-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_star_ratings")
public class StarRatings implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 评分用户ID
     */
    private Integer userId;

    /**
     * 被评视频ID
     */
    private Integer videoInfoId;

    /**
     * 星级(1-5)
     */
    @Max(5)
    @Min(1)
    private Integer rating;

    private LocalDateTime createdAt;


}
